const Button = () => {
  const handleClick = (event) => {
    event.preventDefault(); // 阻止默认行为
    event.stopPropagation(); // 取消事件的冒泡
    alert("Clicked!");
  };
  return (
    <div
      onClick={() => {
        alert("我是div");
      }}
    >
      <button onClick={() => alert(123)}>我是一个按钮</button>
      <button onClick={handleClick}>Click me</button>
      <a href="www.baidu.com" onClick={handleClick}>
        超链接
      </a>
    </div>
  );
};

export default Button;
